﻿using System;
using System.Xml.Serialization;

namespace CloudShot.Settings
{
	[Serializable]
	[XmlRoot(Namespace = "http://cloudshot.codeplex.com", /*ElementName = "CloudShot",*/ DataType = "string", IsNullable = true)]
	public sealed class CloudShotSettings
	{
		public bool IsStartWithComputer { get; set; }
		public bool IsOpenInBrowser { get; set; }
		public bool IsCopyUrl { get; set; }
		public bool IsCopyImage { get; set; }
		public bool IsCopyRecentShotPath { get; set; }
		public bool IsShowNotifications { get; set; }
		public bool IsEnableSounds { get; set; }
		public bool IsShowActiveStorageName { get; set; }
		public bool IsCaptureCursorOnGif { get; set; }

		public string ActiveStorageName { get; set; }
		public string ShotHotkey { get; set; }
		public string RecordHotkey { get; set; }
		public string FollowMouseHotkey { get; set; }
		public int RecordingTimeInSeconds { get; set; }

		[XmlArray(ElementName = "RecentShots")]
		[XmlArrayItem(typeof(RecentShotInfo), ElementName = "Shot")]
		public RecentShotInfo[] RecentShotsList { get; set; }

		[XmlArray(ElementName = "Storages")]
		[XmlArrayItem(typeof(ImageStorageSettings), ElementName = "Storage")]
		public ImageStorageSettings[] ImageStorageSettingsList { get; set; }

		public CloudShotSettings()
		{
			RecentShotsList = new RecentShotInfo[0];
			ImageStorageSettingsList = new ImageStorageSettings[0];
		}
	}
}